import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

// 定义路由数组

const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        redirect: '/IntelligentDetection'
    },
    {
        path: '/IntelligentDetection',
        name: 'IntelligentDetection',
        component: () => import('@/view/IntelligentDetection/IntelligentDetection.vue') // 智能检测
    },
    {
        path: '/Situation',
        name: 'Situation',
        component: () => import('@/view/Situation/Situation.vue') // 就业态势
    },
    {
        path: '/Safety',
        name: 'Safety',
        component: () => import('@/view/Safety/Safety.vue') // 安防管理
    },
    {
        path: '/Maintenance',
        name: 'Maintenance',
        component: () => import('@/view/Maintenance/Maintenance.vue') // 设备运维
    },
    {
        path: '/Control',
        name: 'Control',
        component: () => import('@/view/Control/Control.vue')
    }

]

// 创建路由实例
const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL), // HTML5 模式
    routes
})

export default router